﻿@model Domain.Entity.Game

@{
    ViewBag.Title = "Remove Image";
}

<h2 class="title @Html.GetColor(Request.Cookies["color"])">Remove Images Of @Model.Name</h2>

<div id="titlelessItem">
<div class = "item roundTextBox @Html.GetTextBoxColor(Request.Cookies["color"])">

@using (Html.BeginForm("RemoveImage","Game",FormMethod.Post))
{
    @Html.HiddenFor(m => m.Id)

    if (Model.Pictures.Count > 0)
    {
        int index = 0;
        foreach (var picture in Model.Pictures)
        {
        <img width="150" height="150"
                            src="@Url.Action("GetDisplayImage", "Game", new { Model.Id, index = index++, Area = "" })" />
        
        <input type="radio" name="pictureId" value="@picture.Id" class="@Html.GetColor(Request.Cookies["color"])" />
        }
    
    <input type="submit" value="Remove Selected" class="@Html.GetColor(Request.Cookies["color"])"/>
    @Html.ActionLink("Cancel", "Index")
    }
    else
    {
        <p>There are no images to remove.</p>
    }
}

</div>
</div>